package com.ruoyi.common.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 功能：
 *
 * @author：LCL
 * @create：2020/12/16 9:26
 * @version：2020 Version：1.0
 * @company：小牛科技 Created with IntelliJ IDEA
 */
@Component
public class RedisConstants {

	/**
	 * 监听数据后缀
	 */
	public static String suffix;

	/**
	 * 每日爆品时间 单位秒
	 */
	public static Integer hotTime;

	/**
	 * 秒杀专区时间 单位秒
	 */
	public static Integer rushTime;

	/**
	 * 好物推荐时间 单位秒
	 */
	public static Integer goodsTime;

	/**
	 * 监听订单数据后缀
	 */
	public static String orderSuffix;

	/**
	 * 订单过期时间 单位秒
	 */
	public static Integer orderTime;

	@Value("${aishangtuan.goods.expired.suffix}")
	public void setSuffix(String suffix) {
		RedisConstants.suffix = suffix;
	}

	@Value("${aishangtuan.goods.expired.orderSuffix}")
	public void setOrderSuffix(String orderSuffix) {
		RedisConstants.orderSuffix = orderSuffix;
	}

	@Value("${aishangtuan.goods.expired.hotTime}")
	public void setHotTime(Integer hotTime) {
		RedisConstants.hotTime = hotTime;
	}

	@Value("${aishangtuan.goods.expired.rushTime}")
	public void setRushTime(Integer rushTime) {
		RedisConstants.rushTime = rushTime;
	}

	@Value("${aishangtuan.goods.expired.goodsTime}")
	public void setGoodsTime(Integer goodsTime) {
		RedisConstants.goodsTime = goodsTime;
	}

	@Value("${aishangtuan.goods.expired.orderTime}")
	public void setOrderTime(Integer orderTime) {
		RedisConstants.orderTime = orderTime;
	}

	public static String getSuffix() {
		return suffix;
	}

	public static Integer getHotTime() {
		return hotTime;
	}

	public static Integer getRushTime() {
		return rushTime;
	}

	public static Integer getGoodsTime() {
		return goodsTime;
	}

	public static String getOrderSuffix() {
		return orderSuffix;
	}

	public static Integer getOrderTime() {
		return orderTime;
	}
}
